# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libdc1394
pkgver=2.2.6
pkgrel=0
pkgdesc="High level programming interface to control IEEE 1394 based cameras"
url="https://damien.douxchamps.net/ieee1394/libdc1394/"
options="!check"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="libusb-dev libraw1394-dev"
makedepends="$depends_dev linux-headers"
subpackages="$pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/project/libdc1394/libdc1394-2/$pkgver/libdc1394-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

# there is only one tool and its only 4k...
#tools() {
#	pkgdesc="Tools to use with $pkgname"
#	replaces="$pkgname"
#
#	amove usr/bin
#}

sha512sums="2d60ed1054da67d8518e870193b60c1d79778858f48cc6487e252de00cc57a08548515d41914a37d0227d29e158d68892c290f83930ffd95f4a483dce5aa3d25  libdc1394-2.2.6.tar.gz"
